package playground.simulator;

import com.hathor.batch.BatchFileGenerator;
import com.hathor.conf.PropertyLoader;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.hathor.networking.sender.BatchSender;

/**
 * Hello world!
 *
 */
public class SendKillCommand {

    public static void main(String[] args) {
        PropertyLoader.loadUserProperties();
        BatchSender sender = new BatchSender("localhost", PropertyLoader.getMotherShipPort());
        List<String> listToBatch = new ArrayList<>();
        listToBatch.add(">NEW KENNETH");
        listToBatch.add("ECHO JAVA_HOME");
        File launchingFile = BatchFileGenerator.getInstance().makeBatch(listToBatch);
        try {
            sender.sendBatch(launchingFile);
        } catch (Exception ex) {
            Logger.getLogger(SendKillCommand.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
}
